    $(document).ready(function(){
    var song = document.getElementById("songList");
    var bottom = document.getElementById("bottom");
    var m=song.getElementsByClassName("song").length;
    if (m>11){
        bottom.innerHTML ="<p>[1][2]</p>"
    }else if (m>16){
        bottom.innerHTML ="<p>[1][2][3]</p>"
    }else if (m>24){
        bottom.innerHTML ="<p>[1][2][3][4]</p>"
    }else if (m>32){
        bottom.innerHTML ="<p>[1][2][3][4][5]</p>"
    }
});


    function bodychange(){
             $("#li2").removeClass("active");
             $("#li3").removeClass("active");
             $("#li4").removeClass("active");
             $("#li1").removeClass("active"); 
             $("#albumbody").hide();
             $("#singerbody").hide();
             $("#search").hide();
             $("#pankbody").hide();
           
             $("#bottom").removeClass();
    } 
    function getsongList(){
             bodychange();
             $("#pankbody").show();
             $("#li1").addClass("active"); 

    }

    function getsongList2(){
             bodychange();
             $("#singerbody").show();
             $("#li2").addClass("active");
    }

    function getsongList3(){
             bodychange();
             $("#albumbody").show();
             $("#li3").addClass("active");
    }
    function getsongList4(){
             bodychange();
             
            
             $("#search").show();
             
             $("#li4").addClass("active");
             $("#bottom").addClass("getnone");
             

    } 
    
    function getSongMessagea(){
        bodychange();
        var message = document.getElementById("bottom");
    }
 
    function show(tag){
          var btn=new Array();
          var light=document.getElementById(tag);
          var fade=document.getElementById('fade');
          var list=document.getElementsByClassName('song');         
          var singer2=document.getElementsByClassName("glyphicon glyphicon-star-empty");
          var insert=document.getElementById("insertsong");
          var check=document.getElementsByTagName('input'); 
          var obj = window.event?event.srcElement:evt.target;    
          var text = obj.value;     
          for(i=1;i<=list.length;i++){
              btn[i]=document.getElementById("btn"+
                i.toString()); 
          }
          for(var i=1;i<=list.length;i++){
            if(text==("btn"+i.toString())){
              var a=btn[i];
              var string=a.getElementsByClassName("songname1"); 
              var singer=a.getElementsByClassName("songsinger1");             
              var songsinger = singer[0].innerText;
              var songname = string[0].innerText;
              insert.innerHTML="<form action='usersong.do' method='post'>" +
                    "<p style='color:#898989'>是否添加"+songname+"到我的收藏</p>"+
                    "<input type='text' value="+songname+"  style='border:0px;background-color:rgb(255,255,255)' name='songname' id='none'/>"+
                    "<input type='text' value="+songsinger+"  style='border:0px;background-color:rgb(255,255,255)' name='songsinger' id='none'/>"+
                    "<input type='submit' value='是'  style='border:1px;background-color:rgb(255,255,255)'/>"
                    +"</form>";
              light.style.display='block';
              fade.style.display='block';        
            }
          }
          
           
          
    }
    function hide(tag){
          var light=document.getElementById(tag);
          var fade=document.getElementById('fade');
          light.style.display='none';
          fade.style.display='none';
    }
